package com.cocotingo.snail.template;

import java.io.InputStream;

public interface ResourceLoader {
	
	public static class ClassResourceLoader implements ResourceLoader {
		
		private final Class<?> resClass;
		
		public ClassResourceLoader(Class<?> resClass) {
			this.resClass = resClass;
		}

		@Override
		public InputStream loadResourceByName(String name) {
			return resClass.getResourceAsStream(name);
		}
		
	}
	
	public InputStream loadResourceByName(String name);

}
